//
//  TipLabel.m
//  PigMarket
//
//  Created by 张敬 on 2019/7/25.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "MeatTipLabel.h"

@interface MeatTipLabel()

/**
 label
 */
@property (nonatomic, strong) UILabel *textLabel;

@end


@implementation MeatTipLabel

#pragma mark - lifecycle methods

- (void)setupUI{
    
    self.backgroundColor = UIColorFromRGB(0xFFF9D4);
    
    [self addSubview:self.textLabel];
}

- (void)setupLayout{
   
    _textLabel.mj_x = 15;
    _textLabel.mj_y = 0;
    _textLabel.width = KScreenWidth;
}

#pragma mark - setter methods

- (void)setText:(NSString *)text{
    _textLabel.text = text;
}

- (void)setAttributedText:(NSMutableAttributedString *)attributedText{
    _textLabel.attributedText = attributedText;
}

- (void)setHeight:(CGFloat)height{
    
   [super setHeight:height];
    _textLabel.height = height;
}

#pragma mark - getter methods

- (UILabel *)textLabel{
    if (!_textLabel) {
        _textLabel = [[UILabel alloc] init];
        _textLabel.textColor = UIColorFromRGB(0xEC8C00);
        _textLabel.font = mFont(12);
    }
    return _textLabel;
}


@end
